package cn.duxiaod;

public class IdGenerateService {
    private Long datacenterId;
    private Long machineId;

    public IdGenerateService(Long datacenterId,Long machineId) {
        this.datacenterId = datacenterId;
        this.machineId = machineId;
    }

    public Long generate() {
        return  new SnowFlake(datacenterId,machineId).nextId();
    }
}
